﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WorkTool
{
	public partial class GetString : Form
	{
		public GetString(string Message)
		{
			InitializeComponent();
			label1.Text = Message;
			textBox1.PasswordChar = '\0';
		}
		public GetString(string Message, bool isPassword)
		{
			InitializeComponent();
			label1.Text = Message;
			if (isPassword) textBox1.PasswordChar = '*';
			else textBox1.PasswordChar = '\0';
		}

		public string TextValue = "";

		private void btnCxl_Click(object sender, EventArgs e)
		{
			TextValue = null;
			this.DialogResult = DialogResult.Cancel;
			this.Close();
			return;
		}

		private void btnOK_Click(object sender, EventArgs e)
		{
			TextValue = textBox1.Text;
			this.DialogResult = DialogResult.OK;
			this.Close();
			return;
		}
	}
}
